#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int n = 0;
	scanf("%d", &n);
	int arr[100] = { 0 };
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &arr[i]);
	}
	int ans = n;
	for (int i = 0; i < n; i++)
	{
		if (arr[i] == 1)
		{
			ans--;
		}
	}
	printf("%d", ans);
	return 0;
}


